<?php
function access_control($id_permiso)
{
	include_once('libs/db.php');
	
	$query = "SELECT * FROM permisos_usuarios 
	          WHERE login = '{$_SESSION['login']}' AND id_permiso = {$id_permiso} AND status = 0;";
	$result = @mysql_query($query);
	if (@mysql_num_rows($result) > 0) {
		mysql_free_result($result);
		return true;
	}
	return false;
}
?>